import App from './App'
// uni中pinia的写法
import * as pinia from 'pinia';
//引入持久化存储的插件
import { createUnistorage } from "pinia-plugin-unistorage"

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	//安装pinia
	let store = pinia.createPinia();
	//安装持久化存储
	store.use(createUnistorage())
	//使用pinia
	app.use(store)
	return {
		app
	}
}
// #endif